package com.aliyun.messagemgt.common.dto.send;

import com.aliyun.messagemgt.common.annotation.CustomAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

/**
 * @ClassName: SystemMsgPushDTO
 * @Description:
 * @Author: wugongzi
 * @Date: 2021/9/22 9:10
 * @Version: 1.0
 */
@Getter
@Setter
@ToString
@ApiModel("应用端推送DTO")
public class SystemMsgPushDTO implements Serializable {
    private static final long serialVersionUID = -3034784871274291616L;

    @ApiModelProperty("消息源编码")
    private String sourceCode;
    @ApiModelProperty("消息源名称")
    private String sourceName;
    @ApiModelProperty("场景编码")
    private String sceneCode;
    @ApiModelProperty("场景名称")
    private String sceneName;

    @Valid
    @NotEmpty(message = "msgRecordList 不为空")
    @CustomAnnotation(name = "msgRecordList", desc = "消息体列表")
    @ApiModelProperty("系统端消息列表")
    private List<SystemMsgRecordDTO> messageRecordList;

    @Getter
    @Setter
    @ToString
    @ApiModel("系统端消息列表")
    public static class SystemMsgRecordDTO implements Serializable {

        private static final long serialVersionUID = 1872112302115930120L;

        private String messageId;
        private List<String> receiveEmployeeNos;
        private List<String> receiveUserIds;
        private List<String> receiveUserPhones;
        private String messageContent;
        private String messageAttachment;
    }
}
